package org.example;

import java.math.BigDecimal;
import java.math.MathContext;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:何人亮
 * Date:2024-10-25
 * 16:09
 */
public class Test {

    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        while(true){
            int count=1;
            int n=sc.nextInt();
            if(n==0){
                break;
            }else if(count!=1){
                System.out.println();
            }
            int i=0;
            BigDecimal[]  arr=new BigDecimal[n];
            while(n>0){
                arr[i]=new BigDecimal(sc.next());
                i++;
                n--;
            }
            BigDecimal sum=new BigDecimal("0");
            for(BigDecimal arr1:arr){
                sum=sum.add(arr1);
            }
            BigDecimal avg=sum.divide(new BigDecimal(arr.length),8,BigDecimal.ROUND_HALF_UP);
            BigDecimal a2=BigDecimal.ZERO;
            for(BigDecimal arr1:arr){
                BigDecimal diff=arr1.subtract(avg);
                a2=a2.add(diff.multiply(diff));
            }
            a2=a2.divide(new BigDecimal(arr.length),8,BigDecimal.ROUND_HALF_UP);
            double aa2=0;

            aa2=Math.sqrt(a2.doubleValue());
            System.out.printf("%.8f",aa2);
            count++;
        }
    }
}

